<script type="text/javascript">

    $(document).ready(function(){
        
        $('.firstpage').button();
        $('.lastpage').button();
        $('.previouspage').button();
        $('.nextpage').button();
        $('.page-num').button();
        $('.current-page').button();
    });

</script>

<p class="pagination">

    <?php if ($first_page !== FALSE): ?>
        <a href="<?php echo HTML::chars($page->url($first_page)) ?>" rel="first"><button  class="firstpage"><font>第一页</font></button></a>
    <?php else: ?>
        <button  class="firstpage"><font style="color:#ddd">第一页</font></button>
    <?php endif ?>

    <?php if ($previous_page !== FALSE): ?>
        <a href="<?php echo HTML::chars($page->url($previous_page)) ?>" rel="prev"><button  class="previouspage"><font>前一页</font></button></a>
    <?php else: ?>
        <button  class="previouspage"><font style="color:#ddd">前一页</font></button>
    <?php endif ?>

    <?php for ($i = 1; $i <= $total_pages; $i++): ?>

        <?php if ($i == $current_page): ?>
            <button  class="current-page"> <font style="color:#FF0084"><?php echo $i ?></font></button>
        <?php else: ?>
            <a href="<?php echo HTML::chars($page->url($i)) ?>"><button  class="page-num"><font><?php echo $i ?></font></button></a>
        <?php endif ?>

    <?php endfor ?>

    <?php if ($next_page !== FALSE): ?>
        <a href="<?php echo HTML::chars($page->url($next_page)) ?>" rel="next"><button  class="nextpage"><font>下一页</font></button></a>
    <?php else: ?>
        <button  class="nextpage"><font style="color:#ddd">下一页</font></button>
    <?php endif ?>

    <?php if ($last_page !== FALSE): ?>
        <a href="<?php echo HTML::chars($page->url($last_page)) ?>" rel="last"><button  class="lastpage"><font>最后一页</font></button></a>
    <?php else: ?>
        <button  class="lastpage"><font style="color:#ddd">最后一页</font></button>
    <?php endif ?>

</p><!-- .pagination -->